package cqie.personal.frame.service;

import cqie.personal.frame.bo.*;
import cqie.personal.frame.entity.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import cqie.personal.frame.exception.DataBaseUpdateException;
import cqie.personal.frame.exception.LoginFailException;
import cqie.personal.frame.exception.ValidationFailException;
import cqie.personal.frame.vo.PageVO;
import cqie.personal.frame.vo.UserView;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Yeeeeee
 * @since 2021-09-01
 */
public interface UserInfoService extends IService<UserInfo> {

    UserView login(UserLoginBO userLoginBO) throws ValidationFailException, LoginFailException;

    boolean quit(Integer id);

    boolean register(UserRegisterBO userRegisterBO) throws  ValidationFailException;

    boolean accountValid(String userAccount) throws ValidationFailException;

    PageVO<List<UserView>> getAllUser(GetUserBO user) throws ValidationFailException;

    String updateToken(Integer uid, Integer id);

    boolean addUser(AddModifyUserBO userBO) throws ValidationFailException, IOException, DataBaseUpdateException;

    boolean modifyUser(AddModifyUserBO userBO ) throws ValidationFailException, IOException, DataBaseUpdateException;

    Integer getUserPermission(Integer uid);

    boolean uidValid(Integer uid) throws ValidationFailException;

    boolean addStudentIntoClass(AddModifyStudentBO addModifyBO) throws ValidationFailException;

    boolean removeStudentFromClass(AddModifyStudentBO addModifyBO) throws ValidationFailException;
}
